// 这里是面试题相关的请求
import requset from '@/utils/request'
export const articleListAPI = ({ current, sorter }) => {
  return requset.get('/h5/interview/query', {
    params: {
      current: current,
      pageSize: 10,
      sorter: sorter
    }
  }
  )
}

// 面试题详情请求
export const getArticleDetail = (id) => {
  // return request({})
  return requset.get('/h5/interview/show', { params: { id: id } })
}

// 点赞、取消点赞、收藏、取消收藏
export const updateLikeAndCollect = (data) => {
  return requset.post('/h5/interview/opt', data)
}

// 获取点赞(喜欢)的题目列表、获取收藏的题目列表
export const likeAndCollectAPI = (params) => {
  return requset.get('/h5/interview/opt/list', {
    params: params
  })
}

// 用户名,头像
export const getUserInfoAPI = () => {
  return requset.get('/h5/user/currentUser')
}
